import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/Home.vue'
import Login from '@/views/Login.vue'
import Cards from '@/views/Cards.vue'
import Profile from '@/views/Profile.vue'
import Categories from '@/views/Categories.vue'
import Funds from '@/views/Funds.vue'

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home,
        meta: {
            showTopNav: true,
            showTabbar: true,
            showLogo: true,
            showSettingsButton: true,
            showLanguageButton: true,
            showUserButton: true
        }
    },
    {
        path: '/login',
        name: 'Login',
        component: Login,
        meta: {
            showTopNav: true,
            showTabbar: false, // 登录页不显示底部标签栏
            showLogo: true,
            showLanguageButton: true
        }
    },
    {
        path: '/funds',
        name: 'Funds',
        component: Funds,
        meta: {
            showTopNav: true,
            showTabbar: true,
            showSettingsButton: true
        }
    },
    {
        path: '/cards',
        name: 'Cards',
        component: Cards,
        meta: {
            showTopNav: true,
            showTabbar: true,
            showSettingsButton: true
        }
    },
    {
        path: '/categories',
        name: 'Categories',
        component: Categories,
        meta: {
            showTopNav: true,
            showTabbar: true,
        }
    },
    {
        path: '/profile',
        name: 'Profile',
        component: Profile,
        meta: {
            showTopNav: true,
            showTabbar: true,
            showSettingsButton: true
        }
    }
]

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes
})

export default router